using System;
using System.Xml.Serialization;

namespace Top.Api.Response
{
    /// <summary>
    /// AlipaySystemOauthTokenResponse.
    /// </summary>
    public class AlipaySystemOauthTokenResponse : TopResponse
    {
//        {
//  "taobao_user_id": "640682794",
//  "taobao_user_nick": "xiumeiyinxiang",
//  "w1_expires_in": 86400,
//  "w2_expires_in": 1800,
//  "r1_expires_in": 86400,
//  "r2_expires_in": 86400,
//  "expires_in": 86400,
//  "re_expires_in": 86400,
//  "token_type": "Bearer",
//  "refresh_token": "6202613da1c1180decd9dfh66102c406428ad497f9700a9640682794",
//  "access_token": "6201313ba37ff28fbb87bdfdaae83d27f976ec256ead09a640682794"
//}

        ///// <summary>
        ///// 淘宝用户的id。
        ///// </summary>
        //[XmlElement("taobao_user_nick")]
        //public string UserNick { get; set; }

        ///// <summary>
        ///// 淘宝用户的id。
        ///// </summary>
        //[XmlElement("taobao_user_id")]
        //public int UserId { get; set; }
        /// <summary>
        /// 访问令牌
        /// </summary>
        //[XmlElement("access_token")]
        public string access_token { get; set; }


        /// <summary>
        /// 访问令牌的有效时间，单位是秒。
        /// </summary>
        [XmlElement("expires_in")]
        public double ExpiresIn { get; set; }

        /// <summary>
        /// 刷新令牌的有效时间，单位是秒。
        /// </summary>
        [XmlElement("re_expires_in")]
        public string ReExpiresIn { get; set; }

        /// <summary>
        /// 刷新令牌
        /// </summary>
        [XmlElement("refresh_token")]
        public string RefreshToken { get; set; }
    }
}
